﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Client.JsonDialog
{
    /// <summary>
    /// ShowJsonView.xaml 的交互逻辑
    /// </summary>
    public partial class ShowJsonView : Window
    {
        public ShowJsonView(string o)
        {
            InitializeComponent();
            Json_ = o;
        }


        public string Json_
        {
            get { return (string)GetValue(Json); }
            set { SetValue(Json, value); }
        }

        // Using a DependencyProperty as the backing store for Json_.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty Json =
            DependencyProperty.Register("Json_", typeof(string), typeof(ShowJsonView), new PropertyMetadata(null));

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (!string.IsNullOrEmpty(Json_))
            {
                Clipboard.SetDataObject(Json);
                WPFDevelopers.Minimal.Controls.MessageBox.Show("复制成功", "消息", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
    }
}
